﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Project.Events
{
    class Program
    {
        static void Main(string[] args)
        {
            EventBus.Instance.Subscribe(new OrderGeneratorEventHandler_SendEmail());
            var entity = new OrderGeneratorEvent { OrderId = Guid.NewGuid() };
            Console.WriteLine("生成一个订单，单号为{0}", entity.OrderId);
            EventBus.Instance.Publish(entity);
            Console.ReadKey();
        }
    }
}
